<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta content="width=device-width, initial-scale=1.0" name="viewport">
    <title>头部</title>

    <!-- layui 公用样式 -->
    <link href="static/layui/css/layui.css" media="all" rel="stylesheet">
    <link href="static/layui/font/font-awesome.min.css" rel="stylesheet">
    <link href="static/layui/css/style.css" rel="stylesheet">
    <script charset="utf-8" src="static/layui/layui.js"></script>
</head>
<body>
<div class="layui-layout layui-layout-admin" id="app">
    <div class="layui-header">
        <div class="layui-logo"><img src="static/img/logo_logo.png" width="110px"/></div>
        <div class="layui-nav layui-layout-right">
            <li class="layui-nav-item" id="logout">
                <a href="#"><i class="layui-icon layui-icon-logout"></i> 退出登录</a>
            </li>
        </div>
    </div>
</div>

<script>

    let ctx = localStorage.getItem('ctx');

    layui.use(['form', 'layer'], function () {
        let $ = layui.jquery;
        let layer = layui.layer;

        $("#logout").click(function () {
            // 刷新页面
            window.parent.location.href = location.protocol + "//" + location.host + ctx + '/'
        })
    })

</script>
</body>
</html>
